<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------


Route::get('/', 'index/index')->name('root');
Route::get('verify','index/verify')->name('index/verify');

// 用户注册路由
Route::get('register', 'register/create')->name('register/create');
Route::post('register', 'register/save')->name('register/save');
Route::post('register/verify_code', 'register/verify_code')->name('register/verify_code');
Route::post('register/ajax_check_unique', 'register/ajax_check_unique')->name('register/check_unique');
Route::post('register/ajax_valid_code', 'register/ajax_valid_code')->name('register/valid_code');
// 用户登录路由
Route::get('login', 'login/create')->name('login/create');
Route::post('login', 'login/save')->name('login/save');
Route::post('logout', 'login/delete')->name('logout');
// 修改密码
Route::get('password/reset', 'password/create')->name('password/reset');
Route::post('password/verify_code', 'password/verify_code')->name('password/verify_code');
Route::post('password/ajax_check_present', 'password/ajax_check_present')->name('password/check_present');
Route::post('password/ajax_valid_code', 'password/ajax_valid_code')->name('password/valid_code');
Route::post('password/reset', 'password/save')->name('password/reset_save');

Route::get('user/:id/edit', 'user/edit')->name('user/edit');
Route::get('user/:id', 'user/read')->name('user/read');
Route::put('user/:id', 'user/update')->name('user/update');


Route::post('upload/simditor', 'upload/simditor')->name('upload/simditor');
Route::get('upload', 'upload/create')->name('upload/create');
Route::post('upload', 'upload/save')->name('upload/save');

Route::resource('topic', 'index/topic');
Route::resource('category', 'index/category');
Route::get('category/:id', 'index/category/read')->name('category/read');

Route::resource('reply', 'index/reply');